<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets">

<h:head>
	<link type="text/css" rel="stylesheet" href="#{request.contextPath}/resources/css/styles.css" />
	<title>Dettagli Prenotazione</title>
</h:head>

<h:body>
<div id="header">
	<ui:include src="/resources/snippets/headerCliente.xhtml"></ui:include>
</div>
	<h1> Dettagli Prenotazione</h1>
	<h:outputText value="Dettagli della prenotazione con id #{prenotazione.current.prenotazioneID}" />
	<br/>
	<h2>Destinazione e date</h2>
   	<h:dataTable value="#{prenotazione.current}">
    	<h:column>
    		<f:facet name="header">Destinazione</f:facet>
    		<h:outputText value="#{prenotazione.current.citta}"/>
    	</h:column>
    	<h:column>
    		<f:facet name="header">Data Partenza</f:facet>
    		<h:outputText value="#{prenotazione.current.dataPartenza}"/>
    	</h:column>
    	<h:column>
    		<f:facet name="header">Data Ritorno</f:facet>
    		<h:outputText value="#{prenotazione.current.dataRitorno}"/>
    	</h:column>
 	</h:dataTable>
 	<br/>
 	<h2>Partecipanti</h2>
 	<h:dataTable value="#{prenotazione.current.partecipanti}" var="userCurr">
 		<h:column>
    		<f:facet name="header">Nome</f:facet>
    		<h:outputText value="#{userCurr.nome}"/>
    	</h:column>
    	<h:column>
    		<f:facet name="header">Cognome</f:facet>
    		<h:outputText value="#{userCurr.cognome}"/>
    	</h:column>
    	<h:column>
    		<f:facet name="header">Email</f:facet>
    		<h:outputText value="#{userCurr.email}"/>
    	</h:column>
 	</h:dataTable>
 	<br/>
 	<h2>Volo di Andata</h2>
 	<h:dataTable value="#{prenotazione.current.voloAndata}" var="voloAndata">
    	<h:column>
    		<f:facet name="header">Città Partenza</f:facet>
    		<h:outputText value="#{voloAndata.cittaPartenza}"/>
    	</h:column>
    	<h:column>
    		<f:facet name="header">Città Arrivo</f:facet>
    		<h:outputText value="#{voloAndata.cittaArrivo}"/>
    	</h:column>
    	<h:column>
    		<f:facet name="header">Codice</f:facet>
    		<h:outputText value="#{voloAndata.codice}"/>
    	</h:column>
 		<h:column>
    		<f:facet name="header">Compagnia</f:facet>
    		<h:outputText value="#{voloAndata.compagnia}"/>
    	</h:column>
    	<h:column>
    		<f:facet name="header">Ora</f:facet>
    		<h:outputText value="#{voloAndata.ora}"/>
    	</h:column>
    </h:dataTable>
    <br/>
    <h2>Volo di Ritorno</h2>
    <h:dataTable value="#{prenotazione.current.voloRitorno}" var="voloRitorno">
    	<h:column>
    		<f:facet name="header">Città Partenza</f:facet>
    		<h:outputText value="#{voloRitorno.cittaPartenza}"/>
    	</h:column>
    	<h:column>
    		<f:facet name="header">Città Arrivo</f:facet>
    		<h:outputText value="#{voloRitorno.cittaArrivo}"/>
    	</h:column>
    	<h:column>
    		<f:facet name="header">Codice</f:facet>
    		<h:outputText value="#{voloRitorno.codice}"/>
    	</h:column>
 		<h:column>
    		<f:facet name="header">Compagnia</f:facet>
    		<h:outputText value="#{voloRitorno.compagnia}"/>
    	</h:column>
    	<h:column>
    		<f:facet name="header">Ora</f:facet>
    		<h:outputText value="#{voloRitorno.ora}"/>
    	</h:column>
    </h:dataTable>
    <br/>
    <h2>Hotel</h2>
    <h:dataTable value="#{prenotazione.current.hotels}" var="hotelCurr">
    	<h:column>
    		<f:facet name="header">Nome</f:facet>
    		<h:outputText value="#{hotelCurr.nome}"/>
    	</h:column>
 		<h:column>
    		<f:facet name="header">Città</f:facet>
    		<h:outputText value="#{hotelCurr.citta}"/>
    	</h:column>
    	<h:column>
    		<f:facet name="header">Numero Stelle</f:facet>
    		<h:outputText value="#{hotelCurr.numStelle}"/>
    	</h:column>
    </h:dataTable>
    <br/>
    <h2>Escursioni</h2>
    <h:dataTable value="#{prenotazione.current.escursioni}" var="escursioneCurr">
    	<h:column>
    		<f:facet name="header">Luogo Interesse</f:facet>
    		<h:outputText value="#{escursioneCurr.luogoInteresse}"/>
    	</h:column>
 		<h:column>
    		<f:facet name="header">Città</f:facet>
    		<h:outputText value="#{escursioneCurr.citta}"/>
    	</h:column>
    	<h:column>	
    		<f:facet name="header">Ora</f:facet>
    		<h:outputText value="#{escursioneCurr.ora}"/>
    	</h:column>
    </h:dataTable>
	<br/>
	<br/>
   	<br/>
	<h:link outcome="index" value="Torna alla Home" /> <br/>
	<br/>
	<br/>
	<br/>
<div id="footer">
	<ui:include src="/resources/snippets/footer.xhtml"></ui:include>
</div>
</h:body>
</html>